×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Problem with sobi2 plugin with Jomcomment 4.0 beta2 in legacy

Problem with sobi2 plugin with Jomcomment 4.0 beta2 in legacy 14 years 6 months ago #7458

  • JonusC
  • JonusC's Avatar
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 785
  • Thank you received: 48
When I enable Legacy Mode, the 'New' button is still there in JoomlaComment. I don't think it's related to Legacy mode, you probably have a corrupt JoomlaComment install. Or are not logged in as the Super Admin or something.



EDIT: It doesn't say I have Legacy enabled in that screenshot but It does appear for me when I do enable it...

Problem with sobi2 plugin with Jomcomment 4.0 beta2 in legacy 14 years 6 months ago #7460

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Do you have a save button there??? If yes, click it, then the new button will appear :)

Problem with sobi2 plugin with Jomcomment 4.0 beta2 in legacy 14 years 6 months ago #7463

  • vas
  • vas's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 28
  • Thank you received: 0
OK thanks to all, I've reinstalled the component and it works now.

Problem with sobi2 plugin with Jomcomment 4.0 beta2 in legacy 14 years 6 months ago #7466

  • vas
  • vas's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 28
  • Thank you received: 0
OK, how can I make only certain user group to have the ability to write comments for ex. only administrator?

What I want to do is, only administrators to have the ability to write/comment but the comment to be visible only by registered. Is this possible? :)

P.S. Still use sobi2 so I think that i can asq my question here.

Problem with sobi2 plugin with Jomcomment 4.0 beta2 in legacy 14 years 6 months ago #7469

  • JonusC
  • JonusC's Avatar
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 785
  • Thank you received: 48
vas wrote:

OK, how can I make only certain user group to have the ability to write comments for ex. only administrator?


Change the ACL setting in the JoomlaComment plugin under Plugin Manager.

EDIT: See this page - help.joomla.org/content/view/1465/196/

'Access Level' is what you want to change, to special. Unfortunately Joomla's #1 flaw comes in here - Special is anyone in the "Author" group or higher.

Problem with sobi2 plugin with Jomcomment 4.0 beta2 in legacy 14 years 6 months ago #7470

  • vas
  • vas's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 28
  • Thank you received: 0
JonusC wrote:

vas wrote:

OK, how can I make only certain user group to have the ability to write comments for ex. only administrator?


Change the ACL setting in the JoomlaComment plugin under Plugin Manager.

EDIT: See this page - help.joomla.org/content/view/1465/196/

'Access Level' is what you want to change, to special. Unfortunately Joomla's #1 flaw comes in here - Special is anyone in the "Author" group or higher.


Nothing has changed after the change from registered to special... adminpanel(backedn)->extensions->plugin manager->Content - !JoomlaComment changed from public to special and nothing... is it possible that the problem to be because I use com_sibi2 plugin for jomcoment? Or I need to change something more in the configuration of the plugin?

Problem with sobi2 plugin with Jomcomment 4.0 beta2 in legacy 14 years 6 months ago #7509

  • vas
  • vas's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 28
  • Thank you received: 0
Please help me, i just want only special groups of users to have the ability to write comments. The trick with the plugin doesn't work! Please folks! :(

Problem with sobi2 plugin with Jomcomment 4.0 beta2 in legacy 14 years 6 months ago #7525

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
What jonus suggested is working for content elements.

The trick here is that only administrators will be able to post and see the comments. A normal user will be not able to see the comments. This is the problem with his method.

Unfortunately joomlacomment doesn't come with its own ACL. We are planning to implement such a thing in a future version.

Right now I don't know any way other than hacking the comment.class.php and checking - is the user admin -> yes - show the write form, no don't show the form. Do you want a solution like this?

Problem with sobi2 plugin with Jomcomment 4.0 beta2 in legacy 14 years 6 months ago #7529

  • vas
  • vas's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 28
  • Thank you received: 0
Hello my friend, thank you very much for your help and yes I want you to tell me the hack so only admins to view the writing form :)

Cheers!

Problem with sobi2 plugin with Jomcomment 4.0 beta2 in legacy 14 years 5 months ago #7760

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Thanks for the e-mail remind. I forgot about this thread.
open components/com_comment/joscomment/comment.class.php

Find the function form_htmlCode() around line 2851.

uncomment the following code
	    if ((!$user->username && $this->_only_registered)) {
		$html = $this->onlyRegistered();
        	/* needed informations but hidden : */
		$html .= $this->disable_form($hidden);
		return $html;
	    }
like this:
//	    if ((!$user->username && $this->_only_registered)) {
//		$html = $this->onlyRegistered();
//        	/* needed informations but hidden : */
//		$html .= $this->disable_form($hidden);
//		return $html;
//	    }

After that code add:
		if($user->usertype != 'Super Administrator') {
			$html = '<div class="onlyregistered">Only administrators can write comments</div>';
        	/* needed informations but hidden : */
			$html .= $this->disable_form($hidden);
			return $html;
		}

This should do the trick.

Problem with sobi2 plugin with Jomcomment 4.0 beta2 in legacy 14 years 5 months ago #7843

  • vas
  • vas's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 28
  • Thank you received: 0
Daniel Dimitrov wrote:

Thanks for the e-mail remind. I forgot about this thread.
open components/com_comment/joscomment/comment.class.php

Find the function form_htmlCode() around line 2851.

uncomment the following code

	    if ((!$user->username && $this->_only_registered)) {
		$html = $this->onlyRegistered();
        	/* needed informations but hidden : */
		$html .= $this->disable_form($hidden);
		return $html;
	    }
like this:
//	    if ((!$user->username && $this->_only_registered)) {
//		$html = $this->onlyRegistered();
//        	/* needed informations but hidden : */
//		$html .= $this->disable_form($hidden);
//		return $html;
//	    }

After that code add:
		if($user->usertype != 'Super Administrator') {
			$html = '<div class="onlyregistered">Only administrators can write comments</div>';
        	/* needed informations but hidden : */
			$html .= $this->disable_form($hidden);
			return $html;
		}

This should do the trick.


Thank you for the code it works perfect! Now about this line in the code:
if($user->usertype != 'Super Administrator') {

Is it possible editors, administrators and super administrators to have the rights not only super administrator and how will the code look then?

One big THANK YOU again for the code! :)

Problem with sobi2 plugin with Jomcomment 4.0 beta2 in legacy 14 years 5 months ago #7844

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Well, I'm not sure what the other strings are :)
Try this and if it doesn't work, then I will have a look
if($user->usertype != 'Super Administrator' || $user->usertype != 'Administrator' || $user->usertype != 'Editor') {

Problem with sobi2 plugin with Jomcomment 4.0 beta2 in legacy 14 years 5 months ago #7848

  • vas
  • vas's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 28
  • Thank you received: 0
Daniel Dimitrov wrote:

Well, I'm not sure what the other strings are :)
Try this and if it doesn't work, then I will have a look

if($user->usertype != 'Super Administrator' || $user->usertype != 'Administrator' || $user->usertype != 'Editor') {


Nope, this code doesn't work. With this code even super administrator can't write a comment. Some other suggestion? :(

The groups for my site are the standart joomla groups.

Problem with sobi2 plugin with Jomcomment 4.0 beta2 in legacy 14 years 5 months ago #7850

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
like this?
if(($user->usertype != 'Super Administrator') || ($user->usertype != 'Administrator') || ($user->usertype != 'Editor')) {
 

Problem with sobi2 plugin with Jomcomment 4.0 beta2 in legacy 14 years 5 months ago #7853

  • vas
  • vas's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 28
  • Thank you received: 0
Daniel Dimitrov wrote:

like this?

if(($user->usertype != 'Super Administrator') || ($user->usertype != 'Administrator') || ($user->usertype != 'Editor')) {
 


The same, not working. I've tried with your editor too.
Some other suggestion? :(

Problem with sobi2 plugin with Jomcomment 4.0 beta2 in legacy 14 years 5 months ago #7855

  • vas
  • vas's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 28
  • Thank you received: 0
if($user->usertype != 'Super Administrator')
elseif($user->usertype != 'Administrator')
elseif($user->usertype != 'Editor')
 {

This code doesn't work too.

Problem with sobi2 plugin with Jomcomment 4.0 beta2 in legacy 14 years 5 months ago #7858

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
This code should work:
		if(!(($user->usertype == 'Administrator') || ($user->usertype == 'Super Administrator') || ($user->usertype == 'Editor'))) {
			$html .= $this->disable_form($hidden);
			return $html;
		}

Problem with sobi2 plugin with Jomcomment 4.0 beta2 in legacy 14 years 5 months ago #7859

  • vas
  • vas's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 28
  • Thank you received: 0
One big THANK YOU m8! :silly:
I see that this code doesn't have this:
$html = '<div class="onlyregistered">Only administrators can write comments</div>';

can I have it in the new code or it's making the whole problem? :)

Re: Problem with sobi2 plugin with Jomcomment 4.0 beta2 in legacy 11 years 11 months ago #16134

  • vas
  • vas's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 28
  • Thank you received: 0
I'm sorry for posting in this very old topic but i've supported your project in the past and I'm willing to do it again. I'm using this old component of yours and I have this module as well mod_comments4.0.0alpha3, but the problem is that my site is extremeply big and I'm not able to upgrade to your newes component and modules so I need to modify and use some old ones. So my problem is that the module does not have the option to show sobi2 comments at all, there is no such an option in the module parameters mod_comments.xml can we do something about this with a little hack of the files?

Re: Problem with sobi2 plugin with Jomcomment 4.0 beta2 in legacy 11 years 11 months ago #16136

  • vas
  • vas's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 28
  • Thank you received: 0
After adding the option to the xml file it worked. But I have another issue, is it possible to show in the module next to the sobi2 title a custom filed, for example a filed_street ot something?

I have a code from a sobi2 related module which use this code:
$database->setQuery( $query );
$s_results = $database->loadObjectList();
 
if(count($s_results)) {
foreach($s_results as $s_result) {
// added code down - MARKO
$custom_F_id = 3; //Change ID of custom filed to Yours. Go to SOBI2 custom filed manager and find a ID of Your custom filed and add it here.
$custom_Article_id = $s_result->itemid;
$customF = mysql_query("SELECT data_txt FROM jos_sobi2_fields_data WHERE itemid = $custom_Article_id AND fieldid = $custom_F_id");
$array_customF = mysql_fetch_array($customF);
//echo $array_customF[0];
and where you want to show the custom field just put this code
$array_customF[0]
but I don't know how to implement it to this module of yours.
http://www.mediafire.com/?y4nl3kbs6ddjc51

Please I'm asking for your help Mr. Daniel Dimitrov !
  • Page:
  • 1
  • 2
Time to create page: 0.168 seconds